#include<opencv4/opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
using namespace std;
class poseSolver{
    public:
    void init();
    void solve_for_armor(Point2f vertex[4],int);
    void Generate3DPoints(int angle_solver_algorithm);
    void get2DPoints(Point2f vertex[4]);
    void solve_for_runes(RotatedRect &selected_rect,int angle_solver_algorithm);
    void compensateGravity();
    bool wrong_dis();
    double get_yaw();
    double get_pitch();
    
    private: 
    double _xErr, _yErr, _euclideanDistance;
    bool  unqualified_dis=0;
    bool firstrun=1;
    Mat cameraMatrix;
    Mat distCoeffs;
    Mat _rVec = cv::Mat::zeros(3, 1, CV_64F);//init rvec
	Mat _tVec = cv::Mat::zeros(3, 1, CV_64F);//init tvec
	vector<Point2f> target2D;
    vector<Point3f> target3D;
    double Y_DISTANCE_BETWEEN_GUN_AND_CAM=0.0;
   
    double armor_length=6.75,armor_height=2.65;//CM  links the panduantiaojian of juli he bu he ge
    double bullet_speed=20;


};